package day01;

/**
 * 坚果类
 */
public class Tallnut {

    int x; //坚果x坐标
    int y; //坚果y坐标
    int width; //坚果宽度
    int height; //坚果高度
    int life; //坚果生命值


    public Tallnut(){
        this.x = 500;// 坚果 x坐标
        this.y = 230;// 坚果 y坐标
        this.width = 81; // 坚果宽
        this.height = 117;// 坚果 高
        this.life = 66;// 默认生命值
    }
    public Tallnut(int y, int x, int width, int height, int life) {
        this.y = y;
        this.x = x;
        this.width = width;
        this.height = height;
        this.life = life;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getLife() {
        return life;
    }

    public void setLife(int life) {
        this.life = life;
    }

    @Override
    public String toString() {
        return "Tallnut{" +
                "x=" + x +
                ", y=" + y +
                ", width=" + width +
                ", height=" + height +
                ", life=" + life +
                '}';
    }

    public static void main(String[] args) {
        Tallnut tallnut = new Tallnut();
        System.out.println(tallnut);
    }
}
